package com.hdj.chapter13;

/**
 * @description 加法类
 * @auther hdj
 * @date 2017/12/14.
 */
public class Plus extends AbstractCalculator implements ICaclculator {

    /**
     * 计算"a+b"
     * @param exp
     * @return
     */
    @Override
    public int cacl(String exp) {
        int[] arrayInt = split(exp,"\\+");
        return arrayInt[0] + arrayInt[1];
    }
}
